// class Person {
//   constructor(name) {
//     this.name = name;
//   }
//   getName() {
//     return this.name
//   }
// }

// let person = new Person("龙")
// console.log(person.getName())

class Persion {
    constructor(name, age) {
      this.name = name;
      this.age = age;
    }

    eat() {
      alert(`${this.name} eat something`);
    }

    speak() {
      alert(`My name is ${this.name}, age ${this.age}， 我是个大笨蛋 `)
    }
}

let tian = new Persion('王雨田',26);
tian.speak();